package chapter3.homework;

/**
 * 乘法表，使用双重循环结构打印一个 从多到少 的九九乘法表
 *
 * @author 作者姓名
 */
public class MultiplicationTable {
    public static void main(String[] args) {
        for (int row = 9; row >= 1; row--) {
            for (int col = 1; col <= row; col++) {
                System.out.print(col + "*" + row + "=" + col * row + "\t");
            }
            System.out.println();
        }

        for (int col = 9; col >= 1; col--) {
            for (int row = 1; row <= col; row++) {
                System.out.print(row + "*" + col + "=" + col * row + "\t");
            }
            System.out.println();
        }
    }
}